#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2020/10/31 21:09|21:09
# @Author  : yangdingyi
# @File    : haha
# @Software: PyCharm

for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                x = a * 100 + b * 10 + c
                y = b * 100 + c * 10 + d
                z = a * 1000 + d * 100 + a * 10 + c
                if x + y == z:
                    print(a, b, c, d)

